﻿namespace WMS6.Services
{
    using System;
    using WMS6.BLL;
    using WMS6.DataEntity;

    public sealed class BaseInfoDetailFactory
    {
        public static IBaseInfoDetail CreateInstance(string className, PubParasInfo pubParasInfo)
        {
            if (!string.IsNullOrEmpty(className))
            {
                switch (className.ToUpper())
                {
                    case "AREA_DETAIL":
                        return new AreaDetailBLL(pubParasInfo);

                    case "SKU_CLASS":
                        return new SkuClassBLL(pubParasInfo);

                    case "LOT_ATTRIBUTE_CODE":
                        return new LotAttributeCodeBLL(pubParasInfo);

                    case "BOM":
                        return new BomBLL(pubParasInfo);

                    case "BOM_DETAIL":
                        return new BomDetailBLL(pubParasInfo);

                    case "PUTAWAY_RULE_DETAIL":
                        return new PutawayRuleDetailBLL(pubParasInfo);

                    case "SYS_CODE_DETAIL":
                        return new SysCodeDetailBLL(pubParasInfo);

                    case "SUBSTITUTE_SKU":
                        return new SubstituteBLL(pubParasInfo);

                    case "ALTERNATE_SKU":
                        return new AlternateSkuBLL(pubParasInfo);

                    case "SKU":
                        return new SkuBLL(pubParasInfo);

                    case "PREALLOCATE_RULE_DETAIL":
                        return new PreAllocateRuleDetailBLL(pubParasInfo);

                    case "ROTATION_RULE_DETAIL":
                        return new RotationRuleDetailBLL(pubParasInfo);

                    case "ALLOCATE_RULE_DETAIL":
                        return new AllocateRuleDetailBLL(pubParasInfo);

                    case "TASK_RULE_DETAIL":
                        return new TaskRuleDetailBLL(pubParasInfo);

                    case "FILTER_CONFIG_DETAIL":
                        return new FilterConfigDetailBLL(pubParasInfo);

                    case "INV_SKU_LOC":
                        return new InvSkuLocBLL(pubParasInfo);

                    case "AUDIT_DEFINITION":
                        return new AuditdefinitionBLL(pubParasInfo);

                    case "RATE_DETAIL":
                        return new RateDetailBLL(pubParasInfo);

                    case "GENERAL_LEDGER_DETAIL":
                        return new GeneralLedgerDetailBLL(pubParasInfo);

                    case "TARIFF_DETAIL":
                        return new TariffDetailBLL(pubParasInfo);

                    case "CALENDAR_GROUP_DETAIL":
                        return new CalendarGroupDetailBLL(pubParasInfo);

                    case "UDF_REPORT_SETTING_DETAIL":
                        return new UdfReportSettingDetailBLL(pubParasInfo);
                }
            }
            return null;
        }
    }
}

